<?php namespace App\Infra;

use App\Utils\ModelOperatorTrait;
use App\Models\Room;
class RoomManager{
	use ModelOperatorTrait;

	public function getRooms($conditions = null,$first = false,$union = []){
		return $this->findModel(Room::class,Room::query()->with($union),$conditions,$first);
	}

	public function updateRoom($conditions = null,$data = null){
		$this->update(Room::class,Room::query(),$conditions,$data);
	}

	public function createRoom($data){
		return $this->create(Room::class,$data);
	}

	public function deleteRoom($conditions = null){
		$this->delete(Room::class,Room::query(),$conditions);
	}
}